<?php

class TorrentController extends Zend_Controller_Action
{

    public function init()
    {
        /* Initialize action controller here */
    }

    public function indexAction()
    {
        // action body
    }

    public function newAction()
    {
        // action body
    }

    public function showAction()
    {
        if($this->_hasParam('id') && is_numeric($id = $this->_getParam('id'))){
        	$torrent = Doctrine_Core::getTable('Model_Torrent')->find($id);
        	$this->view-> torrent = $torrent;
        }
        else {
        	$this->_helper->redirector('index','index','default');
        }
    }

    public function addAction()
    {
        // action body
    }
    
    public function downloadAction()
    {
    	$this->_helper->layout->disableLayout();
    	$this->_helper->viewRenderer->setNoRender(true);
    }


}







